package com.zhan.signalling.exception.listener;

import java.util.List;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import com.corundumstudio.socketio.SocketIOClient;
import com.corundumstudio.socketio.listener.ExceptionListener;

import io.netty.channel.ChannelHandlerContext;

/**
 * 异常监听
 * @author knight
 *
 */
public class ZhanExceptionListener implements ExceptionListener {
	
	private final static Logger LOG = LoggerFactory.getLogger(ZhanExceptionListener.class);
	
	@Override
	public void onEventException(Exception e, List<Object> args, SocketIOClient client) {
		LOG.error(e.getMessage(), e);
		

	}

	@Override
	public void onDisconnectException(Exception e, SocketIOClient client) {
		LOG.error(e.getMessage(), e);

	}

	@Override
	public void onConnectException(Exception e, SocketIOClient client) {
		LOG.error(e.getMessage(), e);

	}

	@Override
	public boolean exceptionCaught(ChannelHandlerContext ctx, Throwable e) throws Exception {
		// TODO Auto-generated method stub
		return false;
	}

	@Override
	public void onPingException(Exception e, SocketIOClient client) {
		// TODO Auto-generated method stub
		
	}

}
